import {ElMessage} from "element-plus";

export const handleDownload =async () =>
{
     // let downlaodurl = 'http://1.1.1.200:9602/templeexcel.xlsx';
     let downlaodurl = 'http://10.0.254.104:9602/templeexcel.xlsx';


     try {
          const link = document.createElement('a');
          link.href = downlaodurl;
          link.setAttribute('download', '河道勘测模板文件.xlsx'); // 自定义下载的文件名
          document.body.appendChild(link);
          link.click();

          ElMessage.success('下载中');
     } catch (error) {
          ElMessage.error('文件下载失败，请重试');
          console.error(error);
     }
     };